#include <iostream>

using namespace std;

double division(double a, double b)
{
    if(b == 0)
        throw "Division by zero";
    if(a == 0)
        throw 0;
    return a / b;
}

void test()
{
    try
    {
        division(10, 0);
    }catch(const char *str)
    {
        string s = str;
        cout << s << endl;
    }catch(double a)
    {
        cout << "a = " << a << endl;
    }
}


int main()
{
    test();
    return 0;
}

